/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dca.sistemascontrole.dao;

import dca.sistemascontrole.domain.DataObject;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.jfree.data.time.FixedMillisecond;

/**
 *
 * @author Rafael
 */
public class GraphicDataManager implements Serializable {

    private List<DataObject> nivelSinalControle = new ArrayList<DataObject>();
    private List<DataObject> nivelTanqueInferior = new ArrayList<DataObject>();
    private List<DataObject> nivelTanqueSuperior = new ArrayList<DataObject>();
    private List<DataObject> uSaturado = new ArrayList<DataObject>();
    private List<DataObject> u = new ArrayList<DataObject>();
    private List<DataObject> up = new ArrayList<DataObject>();
    private List<DataObject> ui = new ArrayList<DataObject>();
    private List<DataObject> ud = new ArrayList<DataObject>();
    private List<DataObject> erro = new ArrayList<DataObject>();
    private List<DataObject> setpoint = new ArrayList<DataObject>();

    public void addSinalControle(double value, long t) {
        nivelSinalControle.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addTanqueInferior(double value, long t) {
        nivelTanqueInferior.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addTanqueSuperior(double value, long t) {
        nivelTanqueSuperior.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addUSaturado(double value, long t) {
        uSaturado.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addU(double value, long t) {
        u.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addUi(double value, long t) {
        ui.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addUd(double value, long t) {
        ud.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addUp(double value, long t) {
        up.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addErro(double value, long t) {
        erro.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void addSetpoint(double value, long t) {
        setpoint.add(new DataObject(value, new FixedMillisecond(t)));
    }

    public void clear() {
        u.clear();
        ui.clear();
        ud.clear();
        up.clear();
        uSaturado.clear();
        erro.clear();
        setpoint.clear();

        nivelSinalControle.clear();
        nivelTanqueInferior.clear();
        nivelTanqueSuperior.clear();
    }

    public List<DataObject> getNivelSinalControle() {
        return nivelSinalControle;
    }

    public List<DataObject> getNivelTanqueInferior() {
        return nivelTanqueInferior;
    }

    public List<DataObject> getNivelTanqueSuperior() {
        return nivelTanqueSuperior;
    }

    public List<DataObject> getuSaturado() {
        return uSaturado;
    }

    public List<DataObject> getU() {
        return u;
    }

    public List<DataObject> getUp() {
        return up;
    }

    public List<DataObject> getUi() {
        return ui;
    }

    public List<DataObject> getUd() {
        return ud;
    }

    public List<DataObject> getErro() {
        return erro;
    }

    public List<DataObject> getSetpoint() {
        return setpoint;
    }
}
